#include<iostream>

const int ArSize = 10;
void strcount(const char* str);

int main()
{
	char input[ArSize];
	char next;
	std::cin.getline(input, ArSize);
	while (std::cin)
	{
		std::cin.get(next);
		while (next != '\n')
			std::cin.get(next);
		strcount(input);
		std::cout << "Enter next line(empty line to quit):" << std::endl;
		std::cin.getline(input, ArSize);
	}
	std::cout << "Bye." << std::endl;
	
	return 0;
}

void strcount(const char* str)
{
	static int total = 0;
	int count = 0;
	std::cout << "\"" << str << "\" contain: ";
	while (*str++)
		count++;
	total += count;
	std::cout << count << " characters." << std::endl;
	std::cout << total << " characters total." << std::endl;
}